import enum


class BinEnum(enum.Enum):
    number = ("number", "BIN/IIN", "number")
    brand = ("brand", "品牌", "brand")
    type = ("type", "卡类型", "type")
    level = ("level", "卡层级", "level")
    currency = ("currency", "货币", "currency")
    issuer_name = ("issuer_name", "发行名称", "issuer_name")
    country_name = ("country_name", "国家", "country_name")
    country_flag = ("country_flag", "国家标识", "country_flag")
    country_currency = ("country_currency", "国家货币", "country_currency")
    country_alpha2 = ("country_alpha2", "A2", "country_alpha2")
    country_alpha3 = ("country_alpha3", "A3", "country_alpha3")
    create_time = ("create_time", "创建时间", "create_time")

    def __init__(self, attr, desc_, value):
        self._attr = attr
        self._desc_ = desc_
        self._value = value

    def __repr__(self):
        return f'BinEnum({self._attr}, {self._desc_}, {self._value})'

    @property
    def attr(self):
        return self._attr

    @attr.setter
    def attr(self, new_attr):
        self._attr = new_attr

    @property
    def desc_(self):
        return self._desc_

    @desc_.setter
    def desc_(self, new_desc):
        self._desc_ = new_desc

    @property
    def value(self):
        return self._value

    @value.setter
    def value(self, new_value):
        self._value = new_value

    @staticmethod
    def getDescList():
        return [item.desc_ for item in BinEnum]

    @staticmethod
    def getValuesStr():
        return ','.join([item.value for item in BinEnum])

    @staticmethod
    def getValuesList():
        return [item.value for item in BinEnum]